/*
 * Copyright 2024 The CHANGLEI Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

part of '../px.dart';

/// See [math.e]
const PxDouble e = PxDouble(math.e);

/// See [math.ln10]
const PxDouble ln10 = PxDouble(math.ln10);

/// See [math.ln2]
const PxDouble ln2 = PxDouble(math.ln2);

/// See [math.log2e]
const PxDouble log2e = PxDouble(math.log2e);

/// See [math.log10e]
const PxDouble log10e = PxDouble(math.log10e);

/// See [math.pi]
const PxDouble pi = PxDouble(math.pi);

/// See [math.sqrt1_2]
const PxDouble sqrt1_2 = PxDouble(math.sqrt1_2);

/// See [math.sqrt2]
const PxDouble sqrt2 = PxDouble(math.sqrt2);

/// See [math.min]
T min<T extends Px>(T a, T b) => math.min(a._, b._).px as T;

/// See [math.max]
T max<T extends Px>(T a, T b) => math.max(a._, b._).px as T;

/// See [math.atan2]
PxDouble atan2(Px a, Px b) => math.atan2(a._, b._).px;

/// See [math.pow]
Px pow(Px x, num exponent) => math.pow(x._, exponent).px;

/// See [math.sin]
PxDouble sin(Px radians) => math.sin(radians._).px;

/// See [math.cos]
PxDouble cos(Px radians) => math.cos(radians._).px;

/// See [math.tan]
PxDouble tan(Px radians) => math.tan(radians._).px;

/// See [math.acos]
PxDouble acos(Px x) => math.acos(x._).px;

/// See [math.asin]
PxDouble asin(Px x) => math.asin(x._).px;

/// See [math.atan]
PxDouble atan(Px x) => math.atan(x._).px;

/// See [math.sqrt]
PxDouble sqrt(Px x) => math.sqrt(x._).px;

/// See [math.exp]
PxDouble exp(Px x) => math.exp(x._).px;

/// See [math.log]
PxDouble log(Px x) => math.log(x._).px;
